package com.openlogic.system.api.domain;

import java.util.Date;

import org.noear.solon.validation.annotation.NotBlank;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;

import static com.openlogic.common.core.constants.basic.TenantConstants.TENANT_ID;
import com.openlogic.common.core.web.domain.BaseEntity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 登录日志 对象
 * @author ruoyi
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(value = "sys_login_log")
public class SysLoginLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @Excel(name = "序号")
    @Id
    private Long loginId;
    
    /** 企业账号 */
    @Excel(name = "企业账号")
    @Column(value = "enterprise_name")
    private String enterpriseName;
    
	/** 租户Id */
	@NotBlank(message = "租户id标识不能为空")
	@Column(tenantId = true, value = TENANT_ID)
	private String enterpriseId;

    /** 用户账号 */
    @Excel(name = "用户账号")
    private String userName;

    /** 地址 */
    @Excel(name = "地址")
    private String ipaddr;

    /** 登录设备类型 */
    private String deviceType;

    /** 状态（0成功 1失败） */
    @Excel(name = "状态", replace = { "成功_0", "失败_1" })
    private String status;

    @Column(ignore = true)
    private Date startTime;

    @Column(ignore = true)
    private Date endTime;
    
}
